home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
windownt
/
perlnt.zip
/
t
/
op
/
magic.nt
< prev
next >
Wrap
Text File
|
1993-07-25
|
542b
|
22 lines
#!./perl
# $Header: magic.t,v 4.0 91/03/20 01:53:35 lwall Locked $
$| = 1; # command buffering
print "1..3\n";
eval '$ENV{"foo"} = "hi there";'; # check that ENV is inited inside eval
if (`echo %foo%` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";}
unlink 'ajslkdfpqjsjfk';
$! = 0;
open(foo,'ajslkdfp');
if ($! == 2) {print "ok 2\n";} else {print "not ok 2\n";}
@val1 = @ENV{keys(%ENV)}; # can we slice ENV?
@val2 = values(%ENV);
print join(':',@val1) eq join(':',@val2) ? "ok 3\n" : "not ok 3\n";